Allow specify property value without lambda in ExecuteUpdate #29139
+229
−78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #28968
Description
This is a non-breaking tweak to a new API introduced in EF7. It allows a simpler form to be used for
ExecuteUpdate
. Specifcally,can be used instead of
There may be many calls to
SetProperty
and setting to a value that does not depend on any other values in the entity is a very common case.Customer impact
Shorter, more readable code for a frequently used common case.
How found
Customer suggestion.
Regression
No. New API, and this is non-breaking for existing use of that API in RC1.
Testing
New tests added.
Risk
Low; non-breaking tweak to new API.
@smitpatel as discussed offline. Added various closure tests, funcletizer seems to be humming along with 100% efficiency.
AFAICT, switching from Expression to regular non-Expression doesn't seem to create particular difficulties for dynamic expression construction. Here's a sample:
What do you think?
Closes #28968